Overview
Setting up a new motor is quite straight forward. Initially you’ll need to solder on the 3 motor phases, power up the board, and then proceede to configuring the ACB v2.0. On this new motor the ACB needs a few pieces of information to operate:- The numeber of Pole Pairs (half the number of poles).
- The relative orientation of the encoder magnet. This is also known as the zero electrical angle. (if using closed loop control).
- PID parameters for controlling the velocity, position, and torque.
Manual PID tuning
When tuning the PID loops theres a few layers of tuning deending on what mode you’re operating in. For example, positional control requires the velocity and torque controllers to already be tuned. Tuning the Velocity or Torque parameters is normall the best place to start, and sometimes torque can be tricky due to cogging (the motor getting stuck at a specific angle). Torque tuning also only applies when not using the voltage mode for controlling current. Good starting parameters for the PID values for the 7 pole pair motor included with the Motor Test Mount are:- Set the velocity PID values to 0, and the velocity P value to something low like 0.1.
- Set the velocity target to 400. Going too low is not good for tuning.
- Observe the steady state velocity, and increase P until you’re at the target velocity value.
- Increase the integral value until the velocity reaches the target value.
- You can normally ignore the D value, but it can help remove some noise (but is also very influenced by it). Keep the D value low to around 0.001 - but try higher values so you can get a feel for it.
- Either the P or I value is too large if you start oscillating a lot. Probably P in most cases.
- If you hear a “bitty” sound, or something that sounds almost like white noise in the motor, it’s probably because the P/I values are too high in the current tuning. Lower them and introduce a very small D value.
- If you have large oscillations in the position mode make sure that the velocity mode is tuned.
- Check that the encoder magnet is close to the encoder sensor. When it’s too far away then there’s potential for noise to take over the angle detection.

